From: Keir Fraser Date: Wed, 9 Apr 2008 14:59:54 +0000 (+0100) Subject: xenstore: fix canonicalize for metanodes X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14231^2~43 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3d405489212d4f87bc382112dda1228f83db2453;p=xen.git xenstore: fix canonicalize for metanodes Signed-off-by: Tim Deegan --- diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index a643f2d969..657322ab8c 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -722,7 +722,7 @@ char *canonicalize(struct connection *conn, const char *node) { const char *prefix; - if (!node || strstarts(node, "/")) + if (!node || (node[0] == '/') || (node[0] == '@')) return (char *)node; prefix = get_implicit_path(conn); if (prefix) diff --git a/tools/xenstore/xenstored_watch.c b/tools/xenstore/xenstored_watch.c index 8e3e4f2b61..16d30899d4 100644 --- a/tools/xenstore/xenstored_watch.c +++ b/tools/xenstore/xenstored_watch.c @@ -183,7 +183,7 @@ void do_unwatch(struct connection *conn, struct buffered_data *in) return; } - node = strstarts(vec[0], "@") ? vec[0] : canonicalize(conn, vec[0]); + node = canonicalize(conn, vec[0]); list_for_each_entry(watch, &conn->watches, list) { if (streq(watch->node, node) && streq(watch->token, vec[1])) { list_del(&watch->list);